package com.zhy.springcloud.service.impl;

import com.zhy.springcloud.dao.StorageDao;
import com.zhy.springcloud.domain.Storage;
import com.zhy.springcloud.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author zhy
 * @Description
 * @ClassName StorageServiceImpl
 * @Date 2021/1/7 17:47
 **/
@Service
@Slf4j
public class StorageServiceImpl implements StorageService {
    @Resource
    private StorageDao storageDao;


    @Override
    public void decrease(Long productId, Integer count) {
        log.info("------------->storage-service 中扣减库存开始");
        storageDao.decrease(productId, count);
        log.info("------------->storage-service 中扣减库存结束");
    }
}
